package com.xhej.rowreat.util;

import java.util.Comparator;

import com.xhej.rowreat.model.Seat;

public class ComparatorResultType implements Comparator {

	public int compare(Object arg0, Object arg1) {
		Seat desc0=(Seat)arg0;
		Seat desc1=(Seat)arg1;

		//首先比较主指标，如果主指标相同，则比较次指标
		int flag=desc0.getRow()-desc1.getRow();
		if(flag==0){
			return desc0.getColumns()-desc1.getColumns();
		}else{
			return flag;
		}  
	}
}
